﻿using System;
using System.Windows.Input;

namespace Padsurface.App.ViewModels
{
    public partial class PadViewModel
    {
        #region SaveSongCommand

        public ICommand SaveSongCommand { get; set; }
		
        private async void SaveSong(object obj)
        {
            var songFile = await _filePicker.SaveSongFileAsync(_song.Name);

            var isCancelled = (songFile == null);
            if (isCancelled)
                return;

            await _songSaver.Save(_song, songFile);
        }

        #endregion
    }
}
